#include <iostream>
#include <tuple>
#include <string>

enum Color { Black, White, Red };

enum A : int;
enum class eca;
struct my_strcut {
    A ea;
    eca eeca;
};

enum A : int {a, b};
//enum B {b, c};

enum class eca { a, b };
enum class ecb { b, a };

using UserInfo = std::tuple<std::string, 
                        std::string, 
                        std::size_t>;

enum class UserInfoFields { Name, Email, Reputation };

//enum UserInfoFields { Name, Email, Reputation };

template<typename E>
constexpr typename std::underlying_type<E>::type 
EnumToType(E enumerator)
{
    return static_cast<typename std::underlying_type<E>::type>(enumerator);
}
int main() {
    eca::a;
    ecb::b;
    if (Black < 10.0);
    if (static_cast<double>(eca::a) < 10.0);

    UserInfo user("zhangsan", "123456@qq.com", 100);
    auto name = std::get<1>(user);

    auto name1 = std::get<static_cast<std::size_t>(UserInfoFields::Name)>(user);

    auto name2 = std::get<EnumToType(UserInfoFields::Name)>(user);

    return 0;
}